#!/bin/sh
#
# $OpenBSD: rundeck.rc,v 1.3 2017/05/27 19:57:07 ajacoutot Exp $

daemon=$(${LOCALBASE}/bin/javaPathHelper -c rundeck)
daemon_flags="-XX:MaxPermSize=256m -Xmx1024m -Djava.io.tmpdir=/var/cache/rundeck -jar ${RDECK_BASE}/rundeck-launcher.jar -b ${RDECK_BASE}"
daemon_user="_rundeck"

. /etc/rc.d/rc.subr

rc_bg=YES
rc_reload=NO

rc_pre() {
	install -d -o _rundeck /var/cache/rundeck
}

rc_stop() {
	pkill -9 -T "${daemon_rtable}" -xf "${pexp}"
}

rc_cmd $1
